<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../lib/layui/css/layui.css" media="all">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
</head>
<body>
<span th:text="|当前RTSP地址为  ${rtsp}|">当前RTSP地址 rtsp://xxxxxx</span>
<form class="layui-form" action="/camera/saveConfig" method="post">
    <input type="hidden" name="id" th:value="${cameraConfig.id}">
    <input type="hidden" name="rtsp" th:value="${rtsp}">
    <div class="layui-form-item">
        <label class="layui-form-label">配置名称</label>
        <div class="layui-inline">
            <input name="configName" th:value="${cameraConfig.configName}" type="text" class="layui-input">
        </div>
    </div>
    <label class="layui-form-label">车道方向</label><a href="#" style="color: #0000FF">绘制</a>
    <!--  车流量  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">车流量:</label>
            <input type="checkbox"  th:checked="${cameraConfig.trafficFlowOpen}" name="trafficFlowOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input name="trafficFlowTime" th:value="${cameraConfig.trafficFlowTime}" type="text" class="layui-input" id="time1" placeholder=" - " value="00:00:00 - 23:59:59">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">推送间隔:</label>
            <input th:value="${cameraConfig.trafficFlowInterval}" name="trafficFlowInterval" class="layui-input" style="width: 40px" value="15">
        </div>
        <div class="layui-inline">分钟</div>
    </div>
    <!--  异常停车  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">异常停车:</label>
            <input th:checked="${cameraConfig.parkOpen}" type="checkbox" checked="" name="parkOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.parkTime}" name="parkTime" type="text" class="layui-input" id="time2" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">判定帧数:</label>
            <input th:value="${cameraConfig.parkFrameNumber}" name="parkFrameNumber" class="layui-input" style="width: 40px" value="0">
        </div>
        <div class="layui-inline">
            帧 <a href="#" style="color: #0000FF">绘制</a>
        </div>
    </div>
    <!--  违禁车辆  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">违禁车辆:</label>
            <input th:checked="${cameraConfig.prohibitedVehiclesOpen}" name="prohibitedVehiclesOpen" type="checkbox" checked="" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.prohibitedVehiclesTime}" name="prohibitedVehiclesTime" type="text" class="layui-input" id="time3" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <a href="#" style="color: #0000FF">绘制</a>
        </div>
    </div>
    <!--  违法行驶  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">违法行驶:</label>
            <input th:checked="${cameraConfig.illegalDrivingOpen}" type="checkbox" checked="" name="illegalDrivingOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.illegalDrivingTime}" name="illegalDrivingTime" type="text" class="layui-input" id="time4" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"> 逆行距离:</label>
            <input th:value="${cameraConfig.retrograde}" name="retrograde" class="layui-input" style="width: 40px" value="200">
        </div>
        <div class="layui-inline">
            像素 <a href="#" style="color:#0000FF;"> 逆行区域绘制</a>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"> 应急刹车道判定帧数:</label>
            <input th:value="${cameraConfig.emergencyLineFrameNumber}" name="emergencyLineFrameNumber" class="layui-input" style="width: 40px" value="0">
        </div>
        <div class="layui-inline">
            帧 <a href="#" style="color:#0000FF;"> 应急刹车到绘制</a>
        </div>
    </div>
    <!--  行人非机动车  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">行人或非机动车:</label>
            <input th:checked="${cameraConfig.peopleOpen}" type="checkbox" checked="" name="peopleOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.peopleTime}" name="peopleTime" type="text" class="layui-input" id="time5" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"> 行人判定帧数:</label>
            <input th:value="${cameraConfig.peopleFrameNumber}" name="peopleFrameNumber" class="layui-input" style="width: 40px" value="0">
        </div>
        <div class="layui-inline">
            帧 <a href="#" style="color:#0000FF;"> 行人区域绘制</a>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"> 非机动车判定帧数:</label>
            <input th:value="${cameraConfig.noMotorVehicleFrameNumber}" name="noMotorVehicleFrameNumber" class="layui-input" style="width: 40px" value="0">
        </div>
        <div class="layui-inline">
            帧 <a href="#" style="color:#0000FF;"> 非机动车区域绘制</a>
        </div>
    </div>
    <!--  抛洒物  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">抛洒物:</label>
            <input th:checked="${cameraConfig.throwingOpen}" type="checkbox" checked="" name="throwingOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.throwingTime}" name="throwingTime" type="text" class="layui-input" id="time6" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"> 判定帧数:</label>
            <input th:value="${cameraConfig.throwingFrameNumber}" name="throwingFrameNumber" class="layui-input" style="width: 40px" value="0">
        </div>
        <div class="layui-inline">
            帧 <a href="#" style="color:#0000FF;"> 绘制</a>
        </div>
    </div>
    <!--  拥堵  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">拥堵:</label>
            <input th:checked="${cameraConfig.trafficJamOpen}" type="checkbox" checked="" name="trafficJamOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.trafficJamTime}" name="trafficJamTime" type="text" class="layui-input" id="time7" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
    </div>
    <!--  施工区域  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">施工区域:</label>
            <input th:checked="${cameraConfig.constructionOpen}" type="checkbox" checked="" name="constructionOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.constructionTime}" name="constructionTime" type="text" class="layui-input" id="time8" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"> 三角锥数目:</label>
            <input th:value="${cameraConfig.triangularConeNumber}" name="triangularConeNumber" class="layui-input" style="width: 40px" value="2">
        </div>
        <div class="layui-inline">
            个 <a href="#" style="color:#0000FF;"> 绘制</a>
        </div>
    </div>
    <!--  火灾  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">火灾:</label>
            <input th:checked="${cameraConfig.fireOpen}" type="checkbox" checked="" name="fireOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.fireTime}" name="fireTime" type="text" class="layui-input" id="time9" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <a href="#" style="color:#0000FF;"> 绘制</a>
        </div>
    </div>
    <!--  团雾  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">团雾:</label>
            <input th:checked="${cameraConfig.fogOpen}" type="checkbox" checked="" name="fogOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.fogTime}" name="fogTime" type="text" class="layui-input" id="time10" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
        <div class="layui-inline">
            <a href="#" style="color:#0000FF;"> 绘制</a>
        </div>
    </div>
    <!--  视频质量  -->
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">视频质量:</label>
            <input th:checked="${cameraConfig.videoQualityOpen}" type="checkbox" checked="" name="videoQualityOpen" lay-skin="switch" lay-filter="switchTest"
                   lay-text="ON|OFF">
        </div>
        <div class="layui-inline">
            <input th:value="${cameraConfig.videoQualityTime}" name="videoQualityTime" type="text" class="layui-input" id="time11" placeholder=" - " value="00:00:00 - 23:59:59">
        </div>
    </div>

    <!--  提交按钮  -->
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>


</body>

<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //时间范围
        for (let i = 1; i <= 11; i++) {
            laydate.render({
                elem: '#time' + i
                , type: 'time'
                , range: true
            });
        }
    })
</script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;

        //监听指定开关
        form.on('switch(switchTest)', function (data) {
            layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
        });
    })
</script>

</html>